package com.hmall.user.controller.inner;


import com.hmall.user.service.IUserService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RequiredArgsConstructor
@RestController
@RequestMapping("/inner")
public class UserControllerInner {
    private final IUserService userService;
    @PutMapping("/users/money/deduct")
    public void deductMoney(@RequestParam Long userId,@RequestParam("pw") String pw, @RequestParam("amount") Integer amount){
        userService.deductMoney(userId,pw, amount);
    }
}
